<ion-view class="port-setting-view" view-title="设置">
    <ion-content>
        <div class="im-flow-container">
            <div class="im-flow-item" ng-repeat="device in data.bindDevices">
                <div class="card device-card">
                    <div class="item item-divider device-card-header">
                        <span>{{device.Name}}</span>
                        <i class="icon ion-close-circled" ng-click="deleteDevice($index, device)"></i>
                    </div>
                    <div class="item item-body">
                        <label class="item item-input port-input">
                            <span class="input-label">绑定串口：</span>
                            <input type="text" readonly="true" ng-model="device.PortName">
                        </label>
                        <label class="item item-input port-input">
                            <span class="input-label">检测串口：</span>
                            <input type="text" readonly="true" ng-model="device.testName" ng-click="selectTestPort(device)">
                            <i class="icon ion-chevron-down"></i>
                        </label>
                    </div>
                    <div class="item item-divider device-card-footer">
                        <button class="button" ng-disabled="!device.testName" ng-click="startObserve(device)">{{device.Tip || '开始检测'}}</button>
                    </div>
                </div>
            </div>
            <div class="im-flow-item">
                <div class="card port-add-card">
                    <i class="icon ion-plus" ng-click="addDevice()"></i>
                </div>
            </div>
        </div>
    </ion-content>
    <ion-footer-bar>
        <span>{{'当前版本：V' + data.appVersion}}</span>
        <im-pull-right>
            <button class="button" ng-click="checkUpdate()">版本检查</button>
            <button class="button" ng-click="goInstalledApp()">已安装应用</button>
        </im-pull-right>
    </ion-footer-bar>
</ion-view>